<?php defined('_JEXEC') or die('Restricted access');?>
<?php
  $mainframe =& JFactory::getApplication('site');
  JHTML::stylesheet('',JaNewsHelper::getFile('janews.css','administrator/components/com_janews/views/common/assets/','templates/'.$mainframe->getTemplate().'/css/'));
  JHTML::script('',JaNewsHelper::getFile('janews.js','administrator/components/com_janews/views/common/assets/','templates/'.$mainframe->getTemplate().'/css/'));
?>
<div id="janews-nav">
<?php 
  global $ja_nav, $option, $uhelp;
  include_once("components/com_janews/views/common/assets/navigation.janews.php");
  if (JRequest::getVar('task')=='help'){
    JA_Component_Menu::showComponentMenuBegin($uhelp,$ja_nav, $option);
  }else {
    switch ($this->controller){
      case 'frontpage':
        JA_Component_Menu::showComponentMenuBegin("index.php?option=com_janews&controller=frontpage", $ja_nav, $option);
        break;
      case  'sectionslayout':
        $cid = JRequest::getVar('cid');
        JA_Component_Menu::showComponentMenuBegin("index.php?option=com_janews&controller=sectionslayout".(JRequest::getVar('task')?"&task=edit&cid[]=".$cid[0]:''), $ja_nav, $option);
        break;
      case 'layouttemplates':
        JA_Component_Menu::showComponentMenuBegin("index.php?option=com_janews&controller=layouttemplates".($this->group ? "&group=".$this->group : '&group=headline'), $ja_nav, $option);
        break;
      case 'languages':
        JA_Component_Menu::showComponentMenuBegin("index.php?option=com_janews&controller=languages".(JRequest::getVar('client') ? "&client=".JRequest::getVar('client') : '&client=0'), $ja_nav, $option);
        break;
      default:
        JA_Component_Menu::showComponentMenuBegin("index.php?option=com_janews&controller=common", $ja_nav, $option);
    }
  }
?>
<?php JA_Component_Menu::showComponentMenuEnd(); ?>
</div>